import request from '@/utils/http'

export function getClassroomPlanningById (id) {
    return request({
        url: `classroomPlanning/${id}`,
        method: 'get'
    })
}

export function listClassroomPlannings (page, pageSize) {
    return request({
        url: 'classroomPlanning',
        method: 'get',
        params: { page, pageSize }
    })
}

export function createClassroomPlanning (data) {
    return request({
        url: 'classroomPlanning',
        method: 'post',
        data
    })
}

export function updateClassroomPlanning (data) {
    return request({
        url: 'classroomPlanning',
        method: 'put',
        data
    })
}

export function deleteClassroomPlanningById (id) {
    return request({
        url: `classroomPlanning/${id}`,
        method: 'delete',
    })
}

export function getClassroomPlanningsByClassroomId (classroomId) {
    return request({
        url: `classroomPlanning/query`,
        method: 'get',
        params: { classroomId }
    })
}
